package code.jzh.compiler.scanner;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class NFAState {
	public int id;
	public Map<Character, Set<Integer>> edges = new HashMap<Character, Set<Integer>>();
	public boolean accepted = false;
	public boolean started = false;
	
	public NFAState(int id) {
		this.id = id;
	}
	
	public void addEdge(char c, int id) {
		Set<Integer> stateIds = edges.get(c);
		if(stateIds==null)
			stateIds = new HashSet<Integer>();
		stateIds.add(id);
		edges.put(c, stateIds);
	}
}
